<%@page import="nnweboa.User"%>
<%@page import="nnweboa.URL"%>
<%@page import="nnweboa.Userinfo"%>
<%@page import="nnweboa.Unitls"%>

<%@page import="java.util.List"%>

<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<title>人员管理</title>
</head>
<%
	String path = request.getContextPath() + "/function/";
%>
<body>

	<table width="100%" border="0" align="center">
		<tr>
			<td width="138">眤称:</td>
			<td width="207">姓名:</td>
			<td width="435">权限</td>
			<td width="435"><div align="center">操作</div>
			</td>
		</tr>
		<%
			List<Userinfo> all = Unitls.findAll();
			for (int i = 0; i < all.size(); i++) {
				Userinfo item = all.get(i);
				String freezestring = "&freeze=";
				String  freeTitle ="";
				if (item.getFreeze() == User.antiFreeze) { 
				freeTitle="冻结";
					freezestring = freezestring + "1";
				} else {
				freeTitle="解冻";
					freezestring = freezestring + "0";
				}
				String  name =item.getName();
		
				
		%>
		<tr>
			<td><%=item.getMail()%></td>
			<td><%=name%></td>
			<td><%=item.getRightChinese()%></td>
			<td><a href="<%=path%>modifyuser.jsp?user=<%=item.getMail()%>">修改</a>
				&nbsp;&nbsp;&nbsp; <a
				href="<%=path%>deleteuser.jsp?user=<%=item.getMail()%> ">删除</a>
				&nbsp;&nbsp;&nbsp; <a
				href="<%=path%>freeze.jsp?user=<%=item.getMail()%><%=freezestring%>"><%=freeTitle%></a>
				&nbsp;&nbsp;&nbsp; <a href="<%=path%>">工作继承</a>
			</td>
		</tr>
		<%
			}
		%>
	</table>
	<p>
		<a href="<%=path%>adduser.jsp">添加</a>
	</p>
</body>
</html>